package com.yzh.homework.calculaion;

public class Circle {
    double r;
    Point p;
    public Circle(){

    }
    public Circle(double r,Point p){
        this.r=r;
        this.p=p;
    }
    public void isExist(Point p){
        double instance = Math.sqrt((this.p.x-p.x)*(this.p.x-p.x)+(this.p.y-p.y)*(this.p.y-p.y));
        System.out.println(instance);
        if(instance<r){
            System.out.println("在圆内");
        }else{
            System.out.println("不在圆内");
        }
    }
    public static void main(String[] args) {
        Circle c =new Circle(6,new Point(6,6));
        c.isExist(new Point(4,4));
    }
}
class Point{
    int x;
    int y;
        public Point(){

    }
    public Point(int x,int y){
        this.x=x;
        this.y=y;
    }
}
